import { request } from '@umijs/max';
export async function List(data: any, options?: { [key: string]: any }) {
  return request('/user/listForPage', {
    method: 'POST',
    data,
    ...(options || {}),
  });
}
export async function Save(data: any, options?: { [key: string]: any }) {
  return request('/user/save', {
    method: 'POST',
    data,
    ...(options || {}),
  });
}
export async function Update(data: any, options?: { [key: string]: any }) {
  return request('/user/update', {
    method: 'POST',
    data,
    ...(options || {}),
  });
}
// 采用编辑接口，状态改为禁用
export async function Delete(data: any, options?: { [key: string]: any }) {
  return request('/user/update', {
    method: 'POST',
    data: { ...data, enabled: 0 },
    ...(options || {}),
  });
}
// 查询所有业务员
export async function ListSalesman() {
  return request('/user/listSalesman', {
    method: 'POST',
  });
}
// 查询所有审核人员
export async function ListReviewer() {
  return request('/user/listReviewer', {
    method: 'POST',
  });
}

// 查询所有理赔人员
export async function ListAdjuster() {
  return request('/user/listAdjuster', {
    method: 'POST',
  });
}
